<?php
class Action {
    
	protected $class;
	protected $method;
	protected $args = array();

        public function __construct($route, $args = array()) {   
   		    $parts = explode('::', $route);
                    $this->class = $parts[0];
                    $this->method = (empty($parts[1])?"index":$parts[1]);
                    $this->args = $args;      
                    if(!empty($parts[2]))
                        $this->args = array_merge (explode(',', $parts[2]), $this->args);
	}
	
	
	public function getClass() {
		return $this->class;
	}
	
	public function getMethod() {
		return $this->method;
	}
	
	public function getArgs() {
		return $this->args;
	}
}
?>